home *** CD-ROM | disk | FTP | other *** search
- Path: cygnus.com!not-for-mail
- From: mrs@cygnus.com (Mike Stump)
- Newsgroups: gnu.g++.help,comp.lang.c++
- Subject: Re: 3Q's: stdio.h, unary minus, declaration/definition
- Date: 8 Mar 1996 14:20:08 -0800
- Organization: Cygnus Support, Mountain View, CA
- Message-ID: <4hqbqo$pkk@cygnus.com>
- References: <Pine.SUN.3.91.960307143932.2763A-100000@grad>
- NNTP-Posting-Host: cygnus.com
-
- In article <Pine.SUN.3.91.960307143932.2763A-100000@grad>,
- Timothy Miller <millert@csee.usf.edu> wrote:
- >
- >I have Stroustrup's book on C++, and his use of the terms 'declaration'
- >and 'definition' are odd to me.
- >
- >With a few exceptions, Stroustrup's book uses definition and
- >declaration completely reverse of what I was taught in school and by
- >books on programming C that I have read.
- >
- >Is he making a mistake or am I?
-
- Think about the English language. A definition is meant to fully
- describe the term, in the definition, one can use other terms that are
- defined elsewhere. A definition is a substantial thing. (If your
- dictionary if less then 4 inches thick, go find a real dictionary, and
- lookup a simple work, like `a'. You will find something rather
- complete, and quite long.
-
- For example, consider:
-
- void walk();
-
- verses
-
- void walk() {
- while (1)
- {
- move_right_leg_forward ();
- move_left_leg_forward ();
- }
- }
-
- and
-
- walk (verb).
-
- verses
-
- walk (verb): The act of repeatedly moving the right leg forward, followed by
- moving the left leg forward.
-
-
- and the words definition and declaration. The longer form immediatly
- above seems to be a definition of the word walk. The one just prior,
- just a declaration that the word walk is a verb. The later is not
- considered a definition of the word walk. In this same way, the first
- one above, is just a declaration of the verb, opps, I mean function
- walk. It doesn't say what walk is. To know what it is, you would
- have to consult a _definition_ of the work walk someplace. The
- definition of walk appears just below the declaration.
-
- Seems to make sense to me. Can you cite the books and provide quotes?
- I am really curious to know if it is just you memory playing tricks on
- you, or if in fact someone else uses the terms differently.
-